package com.moorror.codegenvel.view.window.codegen.domain;

import com.moorror.codegenvel.common.table.AColumnDesc;
import com.moorror.codegenvel.common.table.ColumnValueEnum;
import com.moorror.codegenvel.common.table.bean.AbstractTableStringRow;
import lombok.Data;

import java.util.Map;

/**
 * @Author jiyanghuang
 * @Date 2025/8/24 17:47
 */
@Data
public class ColumnDesc extends AbstractTableStringRow<ColumnDesc> {

    /**
     * 名称
     */
    @AColumnDesc(nameShow = "name", order = 10, cellEditable = false)
    private String name;

    /**
     * 原生列名
     */
    private String columnName;

    /**
     * 全类型
     */
    @AColumnDesc(nameShow = "type", order = 20, valueTypeValuesKey = TableConstant.TYPES_KEY, valueType = ColumnValueEnum.SELECT)
    private String type;

    /**
     * 注释
     */
    @AColumnDesc(nameShow = "comment", order = 30)
    private String comment;

    @AColumnDesc(nameShow = "skipDalDo", order = 50, valueType = ColumnValueEnum.CHECKBOX)
    private boolean skipDalDo = false;

    @AColumnDesc(nameShow = "skipInsert", order = 60, valueType = ColumnValueEnum.CHECKBOX)
    private boolean skipInsert = false;

    @AColumnDesc(nameShow = "skipBatInsert", order = 70, valueType = ColumnValueEnum.CHECKBOX)
    private boolean skipBatInsert = false;

    @AColumnDesc(nameShow = "skipBatUp", order = 80, valueType = ColumnValueEnum.CHECKBOX)
    private boolean skipBatUp = false;

    @AColumnDesc(nameShow = "skipBatQuery", order = 90, valueType = ColumnValueEnum.CHECKBOX)
    private boolean skipBatQuery = true;

    /**
     * 是否跳过
     */
    @AColumnDesc(nameShow = "pageQuery", order = 100, valueTypeValuesKey = TableConstant.KEY_PAGE_QUERY_TYPE, valueType = ColumnValueEnum.SELECT)
    private String pageQuery = "";


    /**
     * 是否跳过
     */
    @AColumnDesc(nameShow = "frontColumnName", order = 110)
    private String frontColumnName = "";

    /**
     * 短类型
     */
    private String shortType;

    /**
     * 标记是否为自定义附加列
     */
    private Boolean custom;
    /**
     * 扩展数据
     */
    private Map<String, Object> ext;
}
